<div class="w-full mx-auto">
    <div class="px-4 sm:px-6 py-4 border-b border-gray-200">
        <h3 id="modalTitle" class="text-lg font-semibold text-gray-900">新建文档</h3>
    </div>
    <form method="POST" class="p-4 space-y-6" action="/document/writer/<%= book.username %>/<%= book.slug %>">
        <div class="space-y-3">
            <label class="block text-sm font-medium text-gray-700">文档标题</label>
            <%- include('../components/input', { name: 'title', id: 'title', value: '', placeholder: '请输入文档标题', required: true, minWidth: '!min-w-72 sm:min-w-[400px]' }) %>
        </div>
        <div class="space-y-3">
            <label class="block text-sm font-medium text-gray-700">文档路径</label>
            <%- include('../components/input', { name: 'doc_slug', id: 'doc_slug', value: '', placeholder: '请输入文档路径', required: true, minWidth: '!min-w-72 sm:min-w-[400px]' }) %>
            <span class="text-xs text-gray-500">URL友好的路径，只能包含字母、数字和连字符</span>
        </div>
        <div class="space-y-3">
            <label class="block text-sm font-medium text-gray-700">是否可见</label>
            <%- include('../components/radio', { name: 'status', value: 'published', options: [ { value: 'draft', label: '草稿' }, { value: 'published', label: '已发布' }, { value: 'archived', label: '已归档' } ], variant: 'button' }) %>
        </div>
        <div class="flex justify-end space-x-3">
            <%- include('../components/button', { variant: 'outline', text: '取消', className: 'px-8 !py-2.5', onclick: 'closeModal("documentModal")' }) %>
            <%- include('../components/button', { type: 'submit', text: '创建', className: 'px-8 !py-2.5', id: 'submitBtn' }) %>
        </div>
    </form>
</div>